package cn.smileyan.demos.core;


import lombok.Getter;

/**
 * 结果码与消息枚举
 * @author smileyan
 */

@Getter
public enum ResultCodeEnum {
    /**
     * 成功执行
     */
    SUCCESS(0, "success"),

    /**
     * 集群数据存在缺失
     */
    MISSING(1, "missing"),

    /**
     * 未知异常
     */
    UNKNOWN_ERROR(-1, "");

    /**
     * 结果码
     */
    private final Integer code;

    /**
     * 结果码描述
     */
    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
